package com.ruoyi.system.domain;

import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.ruoyi.common.core.domain.FileObject;
import com.ruoyi.system.domain.typehandler.FileObjectTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.data.annotation.Transient;

/**
 * 车辆管理对象 t_vehicle_management
 *
 * @author wp
 * @date 2023-08-10
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Accessors(chain = true)
@ToString
@TableName(value = "t_vehicle_management", excludeProperty = "remark")
public class VehicleManagement extends BaseEntity {


    /** ID */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty("公司ID")
    private Long companyId;

    /** 名称 */
    private String vehicleName;

    /** 车辆颜色 */
    @ApiModelProperty("车辆颜色")
    @Excel(name = "车辆颜色", type = Excel.Type.IMPORT)
    private String vehicleColor;

    /** 车辆图片 */
    @ApiModelProperty("车辆图片")
    @TableField(typeHandler = FileObjectTypeHandler.class)
    private List<FileObject> vehiclePic;

    @ApiModelProperty("设备名称")
    @Excel(name = "设备名称", sort = 1)
    private String numberPlate;

    /** 车牌颜色(1：蓝色，2：黄色，3：黑色，4：白色，5：绿色，6：黄绿色，8：农黄色，9：其他) */
    private Long plateColor;

    /** 绑定节点id */
    private Long bindId;

    @ApiModelProperty("绑定状态")
    private Integer bindStatus;

    /** 服务开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date serviceStartTime;

    /** 营运类型(0：其它车辆，1100：班车客运，2100：道路普通货物运输，3100：经营性道路危险货物运输) */
    private Long operateType;

    /** 所属区划 */
    private Long cityCode;

    /** 车辆类型 */
    private Long vehicleType;

    /** 车辆品牌 */
    @Excel(name = "车辆品牌", type = Excel.Type.IMPORT)
    private String vehicleBrand;

    /** 车辆型号 */
    @ApiModelProperty("车辆型号")
    @Excel(name = "车辆型号", type = Excel.Type.IMPORT)
    private String vehicleModel;

    /** 经营线路 */
    private String businessLine;

    /** 设备安装时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date equipmentInstallTime;

    /** 车主姓名 */
    private String ownerName;

    /** 联系电话 */
    private String contactNumber;

    /** 车主性别(性别  0:未知 1：男 2：女) */
    private Integer ownerSex;

    /** 身份证 */
    private String idCard;

    /** 到期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date failureTime;

    /** 监管对象图标路径 */
    @ApiModelProperty("监管对象图标")
    private String objIcon;

    /** 监管对象类型 */
    private Integer objType;

    /** 监管对象年龄 */
    private Integer age;

    @ApiModelProperty("车辆状态0空闲1任务中")
    private Integer vehicleTaskStatus;

    /** 以下为非数据库字段 **/
    @ApiModelProperty("通道号")
    @Transient
    @TableField(exist = false)
    private String channelsNum;
    @ApiModelProperty("设备号")
    @Transient
    @TableField(exist = false)
    private String deviceId;
    @Transient
    @TableField(exist = false)
    @Excel(name = "所属公司", width = 30, type = Excel.Type.EXPORT, sort = 2)
    private String companyName;
    @Transient
    @TableField(exist = false)
    @Excel(name = "上级公司", width = 30, type = Excel.Type.EXPORT, sort = 3)
    private String parentCompanyName;
    @ApiModelProperty("报警规则绑定状态")
    @TableField(exist = false)
    private Integer bindRuleStatus;
    @ApiModelProperty("报警规则绑定状态")
    @TableField(exist = false)
    private Long equipmentId;
}
